<?php

define("ROOT_PATH", dirname(__FILE__));

function DEBUG($variable) {
    echo '<pre style="overflow: auto">';
	var_dump($variable);
	echo '</pre>';
}

require_once 'System/Loader.php';

$dbInfo = System\ConfigLoader::getConfig("database");

$db = new System\Database($dbInfo['mySQLHost'], $dbInfo['mySQLAccount'], $dbInfo['mySQLPassword'], $dbInfo['database']);

$frontController = System\Factory::create("FrontController");
$response = $frontController->run();
header($response->getHeader());
echo $response->getContent();